/**
 * 
 */
package ca.lscs.model;

import javax.persistence.Id;

import com.googlecode.objectify.Key;

/**
 * @author Steve Pennington
 *
 */
public class ChecklistItem {
	
	@Id
	private Long id;
	private String description;
	private Key<ChecklistGroup> group;
	private int order;
	
	//Needed by objectify
	public ChecklistItem() {}
	
	public ChecklistItem(String description, int order, ChecklistGroup group) {
		this.description = description;
		this.order = order;
		this.setGroup(group);
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setGroup(ChecklistGroup group) {
		this.group = new Key<ChecklistGroup>(ChecklistGroup.class, group.getId());
	}

	public Key<ChecklistGroup> getGroup() {
		return group;
	}
	
	public void setOrder(int order) {
		this.order = order;
	}

	public int getOrder() {
		return order;
	}
	
}
